package com.zl.bcyappserver.service.bcy.impl;

import com.zl.bcyappserver.domain.dao.Picture;
import com.zl.bcyappserver.repository.PictureRepository;
import com.zl.bcyappserver.service.bcy.PictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by ZhongLeiDev at 2019/12/3
 */
@Service
public class PictureServiceImpl implements PictureService {

    private PictureRepository pictureRepository;

    @Autowired
    public PictureServiceImpl(PictureRepository pictureRepository) {
        this.pictureRepository = pictureRepository;
    }

    @Override
    public Picture save(Picture picture) {
        return pictureRepository.save(picture);
    }

    @Override
    public Picture findByPath(String path) {
        return pictureRepository.findByPath(path);
    }

}
